home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / utils / tmap102.zip / TMAP.TXT < prev   
Text File  |  1996-04-20  |  6KB  |  113 lines

  1.      TMAP version 1.02 960420, (C) Thomas M. Allen
  2.  
  3.      TMAP presents a graphical display of the fragmentation of the
  4.      clusters on any floppy or hard disk using DOS' FAT file system.
  5.  
  6.      What's a Cluster?
  7.  
  8.      In the DOS world, disk space is allocated to files on an as-
  9.      needed basis. The basic allocation storage unit is called a
  10.      cluster, and the size of a cluster varies by the type of disk,
  11.      its format and the disk's size.  Typical floppy disks have
  12.      cluster sizes of 1024 bytes, while on a hard disk a cluster may
  13.      range from 2048 to 16384 bytes depending on the capacity of the
  14.      disk.  There may be tens of thousands of clusters (allocation
  15.      units) on a hard disk; the FORMAT command determines these sizes.
  16.  
  17.      The clusters are numbered and a file on the disk consists of one
  18.      or more of these allocation units.  A directory entry is little
  19.      more than a file's name, date, time and the disk's file
  20.      allocation table (FAT) entry that represents the first cluster of
  21.      the file contents.  This ordered list of cluster numbers
  22.      comprising the file are coded in the FAT, and is the sequence in
  23.      which the clusters must be read or written so the individual
  24.      pieces of the file get accessed in the right order.
  25.  
  26.      What's Fragmentation?
  27.  
  28.      Fragmentation is the natural consequence of creating and deleting
  29.      files on most file systems.  Since a file is made up of one or
  30.      more clusters whose order is known, a file may be spread out all
  31.      over the disk.  Resaving the file from, say, a word processor,
  32.      writes the file somewhere else on the disk, freeing up the
  33.      original space to be used for something else.  DOS merely follows
  34.      the current chain of cluster numbers in the FAT to read or write
  35.      the file.  It doesn't care how many pieces there are nor how
  36.      they're scattered around the disk.  But jumping all over the disk
  37.      to read and write the bits and pieces slows things down.  If the
  38.      pieces of a file are not located together, we say the file is
  39.      fragmented, and being fragmented can make it extremely difficult
  40.      to unerase or to recover it if destroyed, deleted or lost
  41.      somehow.
  42.  
  43.      TMAP shows the relative level of fragmentation of all the files
  44.      on the disk, nothing more.  It doesn't write to the disk nor is
  45.      there any user interaction.  If the display from TMAP looks like
  46.      a bad case of acne, you are long overdue for running a cleanup
  47.      utility on your disk!
  48.  
  49.      The idea for TMAP came from a utility program called VMAP from
  50.      Golden Bow Systems of San Diego.  According to a representative
  51.      of Golden Bow, VMAP and its mainstream disk de-fragmenter
  52.      product, VOPT, were distributed together as demo programs (the
  53.      VOPT demo went through the actions but didn't actually change the
  54.      disk). They ended up on bulletin boards around the country.  When
  55.      VMAP was written (1987 timeframe), hard disks were relatively
  56.      small.  An earlier version of VMAP didn't work on disk partitions
  57.      larger than 32 megabytes.  A subsequent version only worked
  58.      properly on partitions smaller than 128 Mb.  The reason?  The
  59.      size of the disk's file allocation table (FAT) changes as disk
  60.      partitions get larger.  On the version I used, VMAP assumed it
  61.      could read the FAT as a single 64k block.  However, on disks
  62.      larger than 128 Mb, the FAT size exceeded 64k and VMAP did not
  63.      work right.
  64.  
  65.      Since there are only 1560 display positions on TMAP's display, we
  66.      make each position represent more than one cluster.  The symbol
  67.      displayed is therefore a composite of those adjacent clusters
  68.      grouped together.  The scale, or the number of clusters
  69.      represented by each symbol, is noted above the map.
  70.  
  71.      So, Now What?
  72.  
  73.      Every user of DOS should have a utility program that does
  74.      maintenance on his own hard disk.  Besides frequently running
  75.      CHKDSK to ensure consistency in the file system, Golden Bow's
  76.      VOPT utility does a stellar job of defragmenting and I highly
  77.      recommend it. Norton's Speed Disk works great too.  The
  78.      defragmenter that comes with DOS (defrag) is suitable too.
  79.      Personally I like ORG, a shareware disk organizer written by
  80.      Grevé and Rifkind.
  81.  
  82.      TMAP was authored primarily by Ronald E. Raikes out of our mutual
  83.      desire to have a "VMAP" that worked with our large disks.  He
  84.      wanted it to be a character-based utility that would function
  85.      over his serial port.  With his permission, I have modified his
  86.      character-based version, changing the output format, adding color
  87.      and doing additional testing on other hardware and DOS versions
  88.      using Borland C++.  Its output looks very much like the old VMAP
  89.      from Golden Bow.
  90.  
  91.      I've tested TMAP with a wide range of types and sizes of floppy
  92.      and hard disks (SCSI, ESDI, IDE) on a variety of machines and
  93.      display adapters. It executes under DOS 4.01 and above, including
  94.      the Novell implementations of DOS. It does not work on a CD-ROM
  95.      (CDs don't use the FAT file system) nor on a networked drive.  I
  96.      have not tried it on a Doublespaced volume.
  97.  
  98.      Just before releasing the first version of TMAP, a friend gave me
  99.      a version of VMAP that I didn't even know existed.  Voila, here
  100.      was the version I had wanted all along!  I'm pleased to report we
  101.      get the same display...
  102.  
  103.      Thomas M. Allen
  104.      thos@deltanet.com / 72537.1143@compuserve.com
  105.      North Orange County Computer Club (NOCCC)
  106.      Orange, California
  107.  
  108.      1.02  20 April 1996: Fixed a condition where the computer would
  109.            lock up when reading the file allocation table of a large
  110.            hard disk partition.
  111.  
  112.      1.01  13 December 1993
  113.